<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>用户录入数据</title>
</head>

<body>
    <script>
        let arr = []
        let j = 0
        for (let i = 0; i < 8; i++) {
            arr.push(+prompt(`请输入第${i + 1}个数据`))
        }
        arr.sort(function (a, b) {
            return a - b
        })
        console.log(arr)
        document.write(`大于10的并且是3的倍数的数据有：<br>`)
        for (let i = 0; i < arr.length; i++) {
            if (arr[i] > 10 && arr[i] % 3 === 0) {
                j++
                document.write(`${arr[i]}<br>`)
            }
        }
        document.write(`一共有：${j}`)
    </script>
</body>

</html>